package com.tour.modules.web.until;

import java.util.Calendar;
import java.util.Date;

/**
 * 获取一段时间后的某一天工具类
 * 
 *
 *
 */
public class CalendarUtil {
	private static final Calendar calendar = Calendar.getInstance();

	/**
	 * 获取多少个月后的某天时间
	 * 
	 * @param startDate
	 * @param numMonth
	 * @return
	 */
	public static Date getAfterMonth(Date startDate, Integer numMonth) {
		calendar.setTime(startDate);
		calendar.add(Calendar.MONTH, numMonth);
		return calendar.getTime();
	}

	public static Date getAfterDay(Date startDate, Integer numDay) {
		calendar.setTime(startDate);
		calendar.add(Calendar.DATE, numDay);
		return calendar.getTime();

	}
}
